<template>
  
</template>

<script>
import axios from 'axios'
export default {
  data(){
    return {
      // 1.初始化购物车数据
      arr:[]
    }
  },
  mounted(){
    // 2.发请求，获取购物车的数据 
    axios({
      url:"/api/cartlist",
      method:"get",
      params:{
        uid:JSON.parse(localStorage.getItem("isLogin")).uid
      },
      headers:{
        authorization:JSON.parse(localStorage.getItem("isLogin")).token
      }
    }).then(res=>{
      console.log(res)
    })
  }
}
</script>

<style lang="less" scoped>
@import "../../less/index.less";

</style>